﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SystemEnemyComponent : MonoBehaviour
{
    public GameObject Fly;
    public GameObject Prop;
    int num;
    int FlyCount;
    int time;
    // Update is called once per frame
    void FixedUpdate()
    {
        if (GameConfig.IsGameOver)
            return;
        if (GameConfig.EnemyCount>=10)
        {
            FlyActive();
        }  
    }

    void FlyActive()
    {
        if (GameConfig.EnemyCount >= FlyCount + 5)
        {
            FlyCount = GameConfig.EnemyCount;
            if (Fly == null)
            {
                GameObject.Find("Canvas/FlyEnemy");
            }
            Fly.SetActive(true);
            Fly.transform.Find("GoldBox").gameObject.SetActive(true);
        }

    }

}
